package com.sise.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sise.bean.CodeMsg;
import com.sise.entity.ReceiverInfo;

import java.util.List;

/**
 * @author zj
 */
public interface IReceiverInfoService extends IService<ReceiverInfo> {

    /**
     * 添加一条收货人信息记录
     */
    CodeMsg saveReceiverInfo(ReceiverInfo receiverInfo);

    /**
     * 根据 receiverInfoId 删除一条收货人信息记录
     */
    CodeMsg deleteById(ReceiverInfo receiverInfo);

    /**
     * 根据 receiverInfoId 修改一条收货人信息记录
     */
    CodeMsg updateReceiverInfoById(ReceiverInfo receiverInfo);

    /**
     * 根据 openId 查询该用户的所有收货人信息记录
     */
    List<ReceiverInfo> findByOpenId(String openId);

    /**
     * 根据 openId 查询该用户的默认收货人信息
     */
    ReceiverInfo findDefaultByOpenId(String openId);
}
